import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import EventEmitter from 'eventemitter3';
import store from './store';
import Router from './router';
import browser from './utils/browser';
import { armsInit } from './service/arms';
import * as serviceWorker from './serviceWorker';
import './assets/css/index.less';

// 存储brower信息在window中
window['browser'] = browser();
// 创建观察者
window["observer"] = new EventEmitter();

// arms 错误上报初始化
armsInit()

// 获取当前公众号信息
ReactDOM.render(
    <Provider store={store}>
        <Router />
    </Provider>,
    document.getElementById('root')
);



// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
